﻿using System;
using Logic.BusinessLogic.SocialNetworks;

public partial class Controls_Social_SnSelector : System.Web.UI.UserControl
{
    public BO.User User { get; set; }

    public bool IsFacebook
    {
        get
        {
            return cbFacebook.Checked;
        }

        set
        {
            cbFacebook.Checked = value;
        }
    }

    public bool IsTwitter
    {
        get
        {
            return cbTwitter.Checked;
        }
        set
        {
            cbTwitter.Checked = value;
        }
    }

    //public bool IsWordPress
    //{
    //    get
    //    {
    //        return cbWordPress.Checked;
    //    }
    //    set
    //    {
    //        cbWordPress.Checked = value;
    //    }
    //}

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    public void SetAvailability(SnSelector selector)
    {
        cbFacebook.Enabled = selector.IsFacebook;
        cbTwitter.Enabled = selector.IsTwitter;
        //       cbWordPress.Enabled = selector.IsWordPress;
    }

    public SnSelector GetSelector()
    {
        return new Logic.BusinessLogic.SocialNetworks.SnSelector { IsFacebook = this.IsFacebook, IsTwitter = this.IsTwitter };
    }
}